import api.HttpList;
import banner.BannerHelper;
import bean.Docs;
import service.DownloadService;
import util.ThreadUtils;

import java.util.ArrayList;
import java.util.concurrent.ExecutorService;

public class Main {
    public static void main(String[] args) {
        // 启动banner
        BannerHelper.banner("banner.txt", 2);
        // 获取下载文件基础信息
        System.out.println("--------------------------------");
        //文档库id
        String[] ids = {  ""};
        String path = "./OutPut/";

        ArrayList<Docs> downLoadUrl = new ArrayList<>();
        for (String id : ids) {
            downLoadUrl.addAll( new HttpList().getFileInfoList(id));
        }
        // 下载文件，多线程
        ExecutorService executorService = new ThreadUtils().creatThreadPool();
        new DownloadService().downloadWord(downLoadUrl, executorService,path);
    }
}
